{extends file="../acp.html"}

{block name="title"}{$head_title}{/block}
{block name="css"}

{/block}
{block name="content"}


<div class="formitems inline">  
    <label class="fi-name"></label>  
    <div class="form-controls">
        <button class="btn btn-blue clear_cache"><i class="gicon-check white"></i>清理缓存</button>
    </div>
</div>

{/block} 

{block name="js"}
<script>
{literal}

$('.clear_cache').on('click', function(){
    $.jPops.confirm({
        title:"提示",
        content:'您确定要清理缓存吗？',
        okBtnTxt:"确定",
        cancelBtnTxt:"取消",
        callback:function(r){
            if(r){
                $.ajax({
                    url: '/AcpConfig/clear_cache',
                    type:'post',
                    data: {},
                    success: function(data){
                        if(data == 'success'){
                            alert('缓存成功');
                        }else{
                            alert('缓存失败');
                        }
                    }
                });
            }
            return true;
        }
    });
})

{/literal}
</script>
{/block} 

{block name="css"}
{/block}
